package com.rf.richfitwheel.common.utils;


import com.github.pagehelper.PageInfo;

import java.util.List;

public class PageUtil extends PageUtils {

	//表头
	private List<TableHeadBo> headList;
	//表格
	private List<?> bodyList;

	public PageUtil(PageInfo<?> pageInfo, List<TableHeadBo> headList, List<?> list){
		//当前页
		this.setPage(pageInfo.getPageNum());
		//当前页数
		this.setCurrPage(pageInfo.getPageNum());
		//每页的记录数
		this.setLimit(pageInfo.getPageSize());
		//总的记录数
		this.setTotalCount((int) pageInfo.getTotal());
		//总页数
		this.setTotalPage(pageInfo.getPages());
		//当前页的记录数
		this.setPageSize(pageInfo.getSize());
		this.headList = headList;
		this.bodyList = list;
	}

	public List<TableHeadBo> getHeadList() {
		return headList;
	}

	public void setHeadList(List<TableHeadBo> headList) {
		this.headList = headList;
	}

	public List<?> getBodyList() {
		return bodyList;
	}

	public void setBodyList(List<?> bodyList) {
		this.bodyList = bodyList;
	}
}
